package com.liao.rent.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 房源属性表
 * </p>
 *
 * @author liao
 * @since 2024-12-01
 */
@Getter
@Setter
@TableName("house_attr")
@Schema(description = "房源属性表")
public class HouseAttr implements Serializable {

    private static final long serialVersionUID = 1L;

    @Schema(title = "属性id")
    @TableId(value = "attr_id", type = IdType.AUTO)
    private Integer attrId;

    @Schema(title = "房源id")
    @TableField("house_id")
    private Integer houseId;

    @Schema(title = "房产证号")
    @TableField("certificate_number")
    private String certificateNumber;

    @Schema(title = "厕所数量")
    @TableField("toilet_num")
    private Integer toiletNum;

    @Schema(title = "厨房数量")
    @TableField("kitchen_num")
    private Integer kitchenNum;

    @Schema(title = "客厅数量")
    @TableField("living_room_num")
    private Integer livingRoomNum;

    @Schema(title = "卧室数量")
    @TableField("bedroom_num")
    private Integer bedroomNum;

    @Schema(title = "空调数量")
    @TableField("air_conditio_num")
    private Integer airConditioNum;


    //    @ApiModelProperty("创建时间")
    @Schema(title = "创建时间")
    @TableField(value = "create_time",fill = FieldFill.INSERT)
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime createTime;

    //    @ApiModelProperty("修改时间")
    @Schema(title = "修改时间")
    @TableField(value = "update_time",fill = FieldFill.INSERT_UPDATE)
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime updateTime;

    //    @ApiModelProperty("创建人")
    @Schema(title = "创建人")
    @TableField(value = "create_user",fill = FieldFill.INSERT)
    private Integer createUser;

    //    @ApiModelProperty("修改人")
    @Schema(title = "修改人")
    @TableField(value = "update_user",fill = FieldFill.INSERT_UPDATE)
    private Integer updateUser;
}
